# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgname=run-parts
pkgver=4.8.6
pkgrel=1
pkgdesc='run scripts or programs in a directory'
arch=('x86_64')
url='https://packages.qa.debian.org/d/debianutils.html'
license=('GPL')
depends=('glibc')
source=("http://http.debian.net/debian/pool/main/d/debianutils/debianutils_${pkgver}.tar.xz")
sha256sums=('db09047144dadf6a35d0f28977fbef83b0dd60ca32e6c8512cce2444a6423f73')

build() {
	cd $srcdir/debianutils-$pkgver
	./configure --prefix=/usr
	make run-parts
}

package() {
	cd $srcdir/debianutils-$pkgver
	install -D -m755 run-parts $pkgdir/usr/bin/run-parts
	install -D -m644 run-parts.8 $pkgdir/usr/share/man/man8/run-parts.8
	for l in po4a/*/run-parts.8; do
		install -D -m644  ${l} $pkgdir/usr/share/man/${l:5:2}/man8/run-parts.8
	done
}
